package edu.rpi.tw.escience.stargazer.data;

import edu.rpi.tw.escience.stargazer.data.Position;
import edu.rpi.tw.escience.stargazer.data.SkyRegion;

public class SkyRegion {

	private Position p1;
	private Position p2;
	
	public SkyRegion(Position p1, Position p2){
		this.p1 = p1;
		this.p2 = p2;
	}
	
	public boolean isPositionInRegion(Position p){
		if(p.isDeclinationBiggerThan(this.p1) && !p.isDeclinationBiggerThan(this.p2) 
				&& !p.isRightAscencionBiggerThan(this.p1) && p.isRightAscencionBiggerThan(this.p2))
			return true;
		return false;
	}
	
}
